﻿@model GameSchoolWeb.Models.GetAssignmentModelView 
<div id="templatemo_content">
    @{
        ViewBag.Title = "Verkefni";
    }
    <div class="templatemo_box">
        <h2>
            Verkefni</h2>
        <div class="body">
            <h4>
                Heiti verkefnis</h4>
            <div class="display-label">
                <strong>@Html.DisplayFor(model => model.Assignment.strTitle)</strong></div>
            <div class="display-field">
            </div>
            <hr />
            <h4>
                Meginmál</h4>
            <div class="display-label">
            </div>
            <div class="display-field">
                @Html.DisplayFor(model => model.Assignment.strAssignmentDescription)
            </div>
            <hr />
            <div class="display-label">
                <strong>Sett inn :</strong></div>
            <div class="display-field">
                @Html.DisplayFor(model => model.Assignment.dDateAdded)
            </div>
            <hr />
            <div class="display-label">
                <strong>Fjöldi mögulegra stiga :</strong></div>
            <div class="display-field">
                @Html.DisplayFor(model => model.Assignment.strValue)
            </div>
            <hr />
            <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
            <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
            @using (Html.BeginForm())
            {
                if (HttpContext.Current.User.IsInRole("Nemandi") && Model.assignmentCheck == null)
                {
                @Html.ValidationSummary(true)
                <fieldset>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.TurnInAssignment.strContent)
                    </div>
                    <div class="editor-field">
                        @Html.TextAreaFor(model => model.TurnInAssignment.strContent)
                        @Html.ValidationMessageFor(model => model.TurnInAssignment.strContent)
                    </div>
                    <p>
                        <input type="submit" value="Skila inn" />
                    </p>
                </fieldset>
                }
                else
                { 
    
                <div>
                    <strong>Verkefnið hefur verið skilað!</strong>
                </div>
                }
            }
        </div>
        <div class="box_bottom">
            <span></span>
        </div>
    </div>
</div>
